package iot.wlink.network.payload.down;

import iot.wlink.network.payload.AckPayload;
import lombok.Getter;
import lombok.Setter;

/**
 * @author : willian fu
 * @date : 2021/8/25
 */
public class DownAckPayload implements AckPayload {

    @Setter
    private String uid;

    @Setter
    private Integer code;

    @Getter
    @Setter
    private String msg;

    @Override
    public int getCode() {
        return 0;
    }

    @Override
    public String getMessage() {
        return msg;
    }

    @Override
    public boolean isSuccess() {
        return Integer.valueOf(0).equals(code);
    }

    @Override
    public String getUid() {
        return uid;
    }
}
